﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdm.Master" AutoEventWireup="true"
    CodeBehind="ComprarConsulta.aspx.cs" Inherits="AgileSaude.Web.Compras.ComprarConsulta" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-- TÍTULO DA PÁGINA -->
    <div class="area-titulo container-fluid">
        <div class="container">
            <h2 class="titulo">
                Comprar Consulta</h2>
        </div>
    </div>
    <!-- FIM DO TÍTULO -->
    <div class="container">
        <div class="row">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:ValidationSummary ID="ConsultaValidationSummary" runat="server" CssClass="failureNotification"
                        ValidationGroup="CadastroValidationGroup" />
                    <div class="area-formulario">
                        <fieldset>
                            <div class="form-group">
                                <asp:Label class="col-md-2 control-label" runat="server" ID="lblCidade">
                                    Cidade</asp:Label>
                                <div class="col-md-10">
                                    <asp:DropDownList ID="ddlCidade" runat="server" CssClass="form-control" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddlCidade_OnSelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="form-group">
                                <asp:Label class="col-md-2 control-label" runat="server" ID="lblEspecialidade" Visible="false">
                                    Especialidade</asp:Label>
                                <div class="col-md-10">
                                    <asp:DropDownList ID="ddlEspecialidade" runat="server" CssClass="form-control" AutoPostBack="True"
                                        Visible="false" OnSelectedIndexChanged="ddlEspecialidade_OnSelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="form-group">
                                <asp:Label class="col-md-2 control-label" runat="server" ID="lblMedico" Visible="false">
                                    Médico</asp:Label>
                                <div class="col-md-10">
                                    <asp:GridView ID="gvMedicos" runat="server" AutoGenerateColumns="False" SkinID="CadastrosGrid"
                                        CssClass="table table-striped table-bordered table-hover" DataKeyNames="IdMedico"
                                        AllowSorting="true" OnRowCommand="gvMedicos_RowCommand" OnSorting="gvMedicos_Sorting"
                                        OnRowDataBound="gvMedicos_RowDataBound" PageSize="20" OnPageIndexChanging="gvMedicos_PageIndexChanging"
                                        AllowPaging="true">
                                        <EmptyDataTemplate>
                                            Médicos não encontrados com este critério</EmptyDataTemplate>
                                        <Columns>
                                            <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome">
                                                <ItemStyle HorizontalAlign="Left" BorderColor="White" Width="20%" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="Endereco" HeaderText="Endereço" SortExpression="Endereco">
                                                <ItemStyle HorizontalAlign="Left" BorderColor="White" Width="20%" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="CidadeNome" HeaderText="Cidade" SortExpression="CidadeNome">
                                                <ItemStyle HorizontalAlign="Left" BorderColor="White" Width="20%" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ValorConsulta" HeaderText="Valor da Consulta" SortExpression="ValorConsulta">
                                                <ItemStyle HorizontalAlign="Left" BorderColor="White" Width="10%" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Opções">
                                                <ItemStyle HorizontalAlign="Center" BorderColor="White" Width="30%" />
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkVisualizar" class="btn btn-acoes" runat="server" CausesValidation="false"
                                                        CommandName="Visualizar" ToolTip="Visualizar" OnClick="lnkVisualizar_Click"><i class="fa fa-search fa-lg"></i></asp:LinkButton>
                                                    <asp:LinkButton ID="lnkComprar" class="btn btn-acoes" runat="server" CausesValidation="false"
                                                        CommandName="Comprar" ToolTip="Comprar"><i class="fa  fa-medkit fa-lg" style="font-size: 22px;"></i> Comprar</asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        </fieldset>
                        <div class="row">
                            <div class="form-group">
                                <asp:LinkButton ID="btnVoltar" runat="server" class="btn btn-md btn-warning" Text="&#xf060; Voltar"
                                    OnClick="btnVoltar_Click"></asp:LinkButton>
                            </div>
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="dvConsulta" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
        aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Dados do Médico</h4>
                </div>
                <div class="modal-body">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <div class="modal-body" style="overflow: auto;">
                                <fieldset>
                                    <div class="form-group">    
                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label class="col-md-4 control-label">Nome</label>
                                                <div class="col-md-8 control-label2"><asp:Label ID="lblNome" runat="server"></asp:Label></div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-md-4 control-label">Especialidade</label>
                                                <div class="col-md-8 control-label2"><asp:Label ID="lblEspecialidadeContent" runat="server"></asp:Label></div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-md-4 control-label">Email</label>
                                                <div class="col-md-8 control-label2"><asp:Label ID="lblEmail" runat="server"></asp:Label></div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group"><asp:Image ID="imgMedico" runat="server" CssClass="img-thumbnail" /></div>
                                        </div>                       
                                    </div>
                                    
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Endereço</label>
                                        <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblEndereco" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Cidade</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblCidadeContent" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Bairro</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblBairro" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            CEP</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblCEP" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Telefone 1</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblTel1" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Telefone 2</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblTel2" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">
                                            Breve Curriculum</label>
                                         <div class="col-md-9 control-label2">
                                            <asp:Label ID="lblBreveCV" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
                <div class="modal-footer">
                    <asp:LinkButton ID="btnFechar" runat="server" class="btn btn-sm btn-warning" Text="&#xf00d; Fechar"
                        OnClick="btnFechar_Click"></asp:LinkButton>
                    <%--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>--%>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
